/*
 * Copyright (C), 2020, 安徽艾伦家居饰品有限公司
 * FileName: PageQuery
 * Author:   Allen
 * Date:     2020/8/12
 * Description: 通用分页入参
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.sun.common.core.model.query;

import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

/**
 * 〈通用分页入参〉
 *
 * @author Allen
 * @create 2020/8/12
 * @since 1.0.0
 */
@Data
public class PageQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 页数
     */
    @Deprecated
    private Integer pageIndex;

    /**
     * 页数
     */
    @ApiModelProperty(value = "页数", example = "1", required = true)
    @NotNull
    private Integer current;

    /**
     * 页码
     */
    @ApiModelProperty(value = "页码", example = "10", required = true)
    @NotNull
    private Integer pageSize;

    /**
     * 排序字段
     */
    @ApiModelProperty(value = "排序字段", example = "name", required = false)
    private String sortFiled;

    /**
     * 是否倒序(是：true，否：false)
     */
    @ApiModelProperty(value = "是否倒序", example = "true", required = false)
    private Boolean sortDesc;
}
